package com.xnyzc.lhy.common.penum.approval;

/**
 * 申请额度类型（0个人、1公务）
 * ZHUYUBIN
 */
public enum EApplyAmountType {

    personalOfficial(0, "个人"),
    deptOfficial(1, "部门");

    private Integer value;
    private String desc;

    EApplyAmountType(Integer value, String desc){
        this.value = value;
        this.desc = desc;
    }

    public static EApplyAmountType findById(Integer value) {
        EApplyAmountType eApplyAmountType;
        switch (value) {
            case 0:
                eApplyAmountType = EApplyAmountType.personalOfficial;
                break;
            case 1:
                eApplyAmountType = EApplyAmountType.deptOfficial;
                break;
            default:
                throw new IllegalArgumentException("非法type");
        }
        return eApplyAmountType;
    }

    public Integer getValue() {
        return this.value;
    }

    public String getDesc() {
        return this.desc;
    }
}
